Repository navigation
feat(api): CCC_OnSenderPrefix forward - #123
Merged
Merged
Conversation
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New forward
CCC_OnSenderPrefix(int client, char[] prefix, int maxlen), called while CCC builds the sender name of a chat line, for every author (CCC flags or not, not for /me actions). The prefix goes before the CCC tag and the name. It is colored by CCC's own pass for enabled authors, and with CFormatColor for the others (their sender is already colored at that point).Why: CCC blocks every chat SayText2 and sends its own line with USERMSG_BLOCKHOOKS, so another plugin cannot add anything to chat lines. srcdslab/sm-plugin-GunGameProgression uses it to show a rank tag (
[Sergeant II]) before the player's own CCC tag, without touching the CCC tag in memory or in the database.Backward compatible: no change without a plugin implementing the forward. Version 8.2.0 (ccc.inc).
Built with spcomp 1.13.0.7427, no warning.
Checked
*SPEC* [Command Sergeant Major] <CCC tag> .Rushaway : test rank tag, rank tag in its color, CCC tag unchanged